import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:yuwei_study_language_tools_flutter/panel/query_word_panel.dart';

class RightPanel extends StatefulWidget {
  const RightPanel({super.key});

  @override
  State<RightPanel> createState() => _RightPanelState();
}

class _RightPanelState extends State<RightPanel>
    with SingleTickerProviderStateMixin {
  var _tabController;

  @override
  void initState() {
    // TODO: implement initState
    super.initState();

    _tabController = TabController(length: 4, vsync: this);
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 300,
      child: Column(
        children: [
          TabBar(
            tabs: [Text("查单词"), Text("单词本"), Text("复习"), Text("我的")],
            controller: _tabController,
          ),
          Expanded(
            child: TabBarView(
              children: [
                QueryWordPanel(),
                QueryWordPanel(),
                Placeholder(),
                Placeholder()
              ],
              controller: _tabController,
            ),
          )
        ],
      ),
    );
  }
}
